package com.hkts.naturalgasauthentication.base.dao;

import com.hkts.naturalgasauthentication.base.entity.DepartmentHeader;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface DepartmentHeaderDao extends ManagementBaseDao<DepartmentHeader,String> {
    /**
     * 通过部门和负责人类型获取
     * @param departmentId
     * @param type
     * @return
     */
    List<DepartmentHeader> findByDepartmentIdAndType(String departmentId, Integer type);

    /**
     * 通过部门id删除
     * @param departmentId
     */
    void deleteByDepartmentId(String departmentId);

    /**
     * 通过userId删除
     * @param userId
     */
    void deleteByUserId(String userId);
}
